home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
windows
/
dialbk.zip
/
DIALBACK.WAS
next >
Wrap
Text File
|
1992-08-10
|
2KB
|
72 lines
Here is an example of a dialback script. This is for use
on computer systems which require you to call them, and
they call you back at a pre-specified phone number.
; Dialback script
; This script will log in to a dialback system,
; wait for the dialback, answer, and login
; To modify this script for your system,
; change the dialback_login and login procedures
; to your needs. An example is shown of the logins
; needed for my company's system.
#define RINGS_TO_ANSWER 1
integer answered=0,ring=0
proc main
call dialback_login
when cdchanges call carrierdrop
while 1
endwhile
endproc
proc carrierdrop
call wait_for_dialback
call login
endproc
proc wait_for_dialback
statmsg "Waiting for dialback"
transmit "+++"
pause 2
transmit "ATE1^M"
when target 0 "RING" call ring_indicated
while !answered ; Check answered flag while looping
if ring > 0
statmsg "%d ring" ring ; Display number of rings
endif
endwhile
endproc
proc ring_indicated
ring++ ; Increment the ring counter
if ring >= RINGS_TO_ANSWER ; Answer on the nth ring
transmit "ATA^M"
answered=1
clearwhen target 0
endif
endproc
proc dialback_login
; Your first login into the dialback system
waitfor "Enter Your Login: "
transmit "Larry^M"
waitfor "Password: "
transmit "Curly^M"
waitfor "Dialing 95551212" ; the last statement by the dialback
transmit "+++"
pause 2
transmit "ATH^M" ; Hangup (not required)
endproc
proc login
; The 'final' (or actual) login to the computer system
statmsg "Connected to Acme Soap Company"
waitfor "login:"
transmit "Larry^M"
waitfor "Password: "
transmit "Moe^M"
exit
endproc